import request from '@/utils/request'
export default {
    getCategoryUser(page,limit,searchObj){
        return request({
            url:`/admin/acl/user/${page}/${limit}`,
            method:'get',
            params:{
                username:searchObj
            }
        })
    },
    add(user) {
        return request({
          url: `/admin/acl/user/save`,
          method: 'post',
          data: user
        })
      },
    upp(user){
        return request({
            url: 'admin/acl/user/update',
            method: 'put',
            data: user
        })
    },
    toAssign(id){
        return request({
            url: `/admin/acl/user/toAssign/${id}`,
            method: 'get',
            // data: user
        })
    },
    doAssign(userId,roleId){
        return request({
            url:'/admin/acl/user/doAssign',
            method:'post',
            params:{
                userId,
                roleId
            }
        })
    },
    batchRemove(data){
        return request({
            url:'/admin/acl/user/batchRemove',
            method:'DELETE',
            data
        })
    },
    removeUser(id){
        return request({
            url:`/admin/acl/user/remove/${id}`,
            method:'DELETE',
        })
    },
  
}